Release 10.1A: OpenEdge Development:
ADM Reference


Name native data type table

With a Name Native data type table (table type 3), the caller needs to know what the name of the parameter is that is being set. This temp-table type requires the use of the setupTTFromSig call to build the temp-table required to make the call.

Figure A–3 shows the definition of the Name native data type temp-table.

 DEFINE TEMP-TABLE ttCallParam NO-UNDO 
    FIELD cParamName     AS CHARACTER 
    FIELD cCharacter     AS CHARACTER 
    FIELD tDate          AS DATE 
    FIELD lLogical       AS LOGICAL 
    FIELD iInteger       AS INTEGER 
    FIELD dDecimal       AS DECIMAL 
    FIELD aRaw           AS RAW 
    FIELD hHandle        AS HANDLE 
    FIELD rRowid         AS ROWID 
    INDEX pudx IS UNIQUE PRIMARY 
      cParamName. 

Figure A–3: Name native data type table definition

The code in Example A–10 illustrates how to set up a Name native data type table (table type 3).

Example A–10: Name native data type table 
/* Include the temp-table definition */ 
{src/adm2/calltables.i 
 &PARAM-TABLE-TYPE = "3"} 
/* Create the parameter values into the parameter value table */ 
  CREATE ttCallParam. 
  ASSIGN 
    ttCallParam.cParamName = "pcChar" 
    ttCallParam.cCharacter = "aaa" 
  . 
  CREATE ttCallParam. 
  ASSIGN 
    ttCallParam.cParamName = "piInt" 
    ttCallParam.iInteger   = 12 
  . 
  CREATE ttCallParam. 
  ASSIGN 
    ttCallParam.cParamName = "phHndl" 
    ttCallParam.hHandle    = ? 
  . 

Note: There is no need to specify the mode or data type of the parameter as these are derived from the signature of the call and placed in the appropriate field. However, when using this table type, the value of the parameter being set must be set in the correct data type field, otherwise the value is never retrieved.


Copyright © 2005 Progress Software Corporation
www.progress.com
Voice: (781) 280-4000
Fax: (781) 280-4095